#include "oszlop.h"
#include <sstream>
#include <iostream>

void Oszlop_log::Feltolt(const std::string& e)
{
	_ertekek.push_back(e != "0");
}

void Oszlop_egesz::Feltolt(const std::string& e)
{
	int tmp;
	std::stringstream stmp(e);
	stmp >> tmp;
	_ertekek.push_back(tmp);
}

void Oszlop_valos::Feltolt(const std::string& e)
{
	double tmp;
	std::stringstream stmp(e);
	stmp >> tmp;
	_ertekek.push_back(tmp);
}

std::string Oszlop_log::Ertekek()
{
	std::stringstream s;
	for (int i = 0; i < _ertekek.size(); ++i)
	{
		s << _ertekek[i] << ";";
	}
	
	return s.str();
}

std::string Oszlop_egesz::Ertekek()
{
	std::stringstream s;
	for (int i = 0; i < _ertekek.size(); ++i)
	{
		s << _ertekek[i] << ";";
	}
	
	return s.str();
}

std::string Oszlop_valos::Ertekek()
{
	std::stringstream s;
	for (int i = 0; i < _ertekek.size(); ++i)
	{
		s << _ertekek[i] << ";";
	}
	
	return s.str();
}

std::string Oszlop_szoveg::Ertekek()
{
	std::stringstream s;
	for (int i = 0; i < _ertekek.size(); ++i)
	{
		s << _ertekek[i] << ";";
	}
	
	return s.str();
}